package com.iweb.shopping.service;

import com.iweb.shopping.dao.ShoppingDao;
import com.iweb.shopping.dao.ShoppingDaoImpl;
import com.iweb.shopping.model.Address_sh;
import com.iweb.shopping.model.Cart;
import com.iweb.shopping.model.Goods;
import com.iweb.shopping.model.Goodsdetail;
import com.iweb.util.PageModel;

import java.util.List;

public class ShoppingServiceImpl implements ShoppingService{

    ShoppingDao shoppingDao = new ShoppingDaoImpl();
    @Override
    public List<Goods> selectByPage(PageModel pageModel,Integer userid) {
        return shoppingDao.selectByPage(pageModel,userid);
    }

    @Override
    public Goodsdetail selectById(Integer goodsid) {
        return shoppingDao.selectById(goodsid);
    }

    @Override
    public List<Address_sh> queryAddress(Integer userid) {
        return shoppingDao.queryAddress(userid);
    }

    @Override
    public Address_sh queryAddressById(Integer addressid) {
        return shoppingDao.queryAddressById(addressid);
    }

    @Override
    public int deleteOne(Integer cartid) {
        return shoppingDao.deleteOne(cartid);
    }

    @Override
    public int saveOne(Cart cart) {
        return shoppingDao.saveOne(cart);
    }
}
